{extend name="public/base" /} 
{block name="style"}<link href="__LIB__/fileinput/css/fileinput.min.css" rel="stylesheet" /> {/block}
{block name="body"}
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li>
			<a href="{:url('memapplyrec')}">会员提现申请</a>
		</li>
		<li>
			<strong>处理提现</strong>
		</li>
	</ol>
</div>
<div class="row">
	<div class="col-sm-12">
		<div class="ibox float-e-margins">
			<div class="ibox-content">
				<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('memapplyedit')}">
					<input type="hidden" name="id" value="{$ad.id}" />
					<input type="hidden" id="status" name="status" />
					<input type="hidden" name="uid" value="{$ad.uid}" />
					<div class="form-group">
						<label class="col-sm-3 control-label">提现人：</label>
						<div class="input-group col-sm-4">
							<input type="text"   value="{$ad.mobile}" readonly="readonly" class="form-control" />
							<span><a href="{:url('adminmall/agent/detail2',['id'=>$ad.uid])}">查看认证信息</a></span>
						</div>
					</div>					
					<div class="form-group">
						<label class="col-sm-3 control-label">提现金额：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="balance" name="balance" value="{$ad.balance}" readonly="readonly" class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">实际到账：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="actual_balance" name="actual_balance" value="{$ad.actual_balance}" readonly="readonly" class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">手续费：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="counter_fee" name="counter_fee" value="{$ad.counter_fee}" readonly="readonly" class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">提现类型：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="type_name" name="type_name" value="" readonly="readonly" class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">提现账户：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="cash_name" name="cash_name" value="" readonly="readonly" class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">银行卡预留手机号：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="bank_mobile" name="bank_mobile" value="{$ad.bank_mobile}" readonly="readonly" class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">申请时间：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="createtime" name="createtime" value="{$ad.createtime}" readonly="readonly" class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">上传凭证：</label>
						<div class="input-group col-sm-4">
							<input type="hidden" id="thumb" name="thumb" value="{$ad.thumb}"/>
							<input id="upload" name="upload" type="file" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">处理留言：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="remark" name="remark" value="{$ad.remark}" class="form-control" />
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<div class="col-sm-4 col-sm-offset-3">
							{if condition="$ad.cash_status ==1"}
							<button class="btn btn-primary" type="button" onclick="sub(2)"><i class="fa fa-save"></i> 审核通过</button>
							<button class="btn btn-primary" type="button" onclick="sub(3)"><i class="fa fa-save"></i> 审核退回</button>
							{/if}
							<a href="{:url('memapplyrec')}" class="btn btn-danger"><i class="fa fa-arrow-left"></i> 返回 </a>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
{/block} {block name="script"}
<script src="__JS__/jquery.form.js"></script>
<script src="__JS__/jquery.qrcode.js"></script>
<script src="__JS__/utf.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script>
	var type = '{$ad.type}';
	var typename = "";
	if (type==1){
		typename = 'D+0';
	}else if(type==2){
		typename = 'T+1';
	}else if(type==3){
		typename = 'T+2';
	}
	
	$("#type_name").val(typename);
	var cashname = '{$ad.message}{$ad.card_no}';
	$("#cash_name").val(cashname);
	
	upload_one('{$ad.thumb}','upload','thumb');
	$(function() {
		$("#myForm").validate({
			rules: {
				title: "required",
				type:"required"
			},
			messages: {
				title: ICON.error + "请输入标题",
				type:ICON.error + "请选择类型"
			},
			submitHandler: function(form) {
				ajaxForm();
			}
		});
	});
	
	var surl="adminmall/paylog/applyrec";
	setMenu(surl);
	
	function sub(status) {
		layer.confirm("确认操作", {
			icon: 3
		}, function(index) {
			$("#status").val(status);
			$("#myForm").submit();
		});
	}
</script>
{/block}